package com.woniuxy.rms.service.impl;

import com.woniuxy.rms.dao.GoodsMapper;
import com.woniuxy.rms.pojo.Goods;
import com.woniuxy.rms.service.GoodsService;
import com.woniuxy.rms.util.DataResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Auther: ChenGang  <br/>
 * Date: 2020/3/27 0027:下午 10:20  <br/>
 * Description:商品服务层
 */
@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    GoodsMapper goodsMapper;

    @Override
    public List<Goods> findByPage(Integer currentPage, Integer pageSize, String title, String goodsType, Integer status) {
        return goodsMapper.findByPage(currentPage,pageSize,title,goodsType,status);
    }

    @Override
    public DataResult goodsStatus(Long id, Integer status) {
        goodsMapper.goodsStatus(id,status);
        return DataResult.success();
    }
}